package com.xxx.blog.service.impl;

import com.xxx.blog.entity.Feedback;
import com.xxx.blog.mapper.FeedbackMapper;
import com.xxx.blog.service.FeedbackService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author WangXJ
 * @since 2021-08-08
 */
@Service
public class FeedbackServiceImpl extends ServiceImpl<FeedbackMapper, Feedback> implements FeedbackService {

    @Autowired
    FeedbackMapper feedbackMapper;

    @Override
    public int insertOneFeedBack(String uName, String sex, String email, String phone,String information, String birth) {
        Feedback feedback = new Feedback();
        feedback.setUName(uName);
        feedback.setSex(sex);
        feedback.setEmail(email);
        feedback.setPhone(phone);
        feedback.setInformation(information);
        feedback.setBirth(birth);
        return feedbackMapper.insert(feedback);
    }
}
